package com.sxj.springsourcecode.springframework.factory;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @ProjectName: spring-source-code
 * @Package: com.sxj.springsourcecode.springframework.factory
 * @ClassName: PropertyValues
 * @Author: sxj
 * @Description:
 * @Date: 2024/2/21 14:11
 * @Version: 1.0.0
 */
public class PropertyValues {
    private List<PropertyValue> propertyValues = new CopyOnWriteArrayList<>();

    public List<PropertyValue> getPropertyValues() {
        return propertyValues;
    }

    public void addPropertyValue(String name,Object value){
        PropertyValue pv = new PropertyValue(name, value);
        propertyValues.add(pv);
    }

    /**
     * 判断是否为空
     *
     */
    public boolean isEmpty(){
        return propertyValues.isEmpty();
    }
}
